local skill = fk.CreateSkill {
  name = "zhangchou_slash_skill",
}

local slash_skill = Fk.skills["slash_skill"] --[[ @as ActiveSkill ]]
local ls = require "packages/lvshi/utility"

skill:addEffect("cardskill", {
  max_phase_use_time = 1,
  target_num = 1,
  can_use = slash_skill.canUse,
  mod_target_filter = slash_skill.modTargetFilter,
  target_filter = slash_skill.targetFilter,
  on_effect = function(self, room, effect)
    local damage_type = fk.NormalDamage
    if string.find(effect.card.name, "thunder__slash") then damage_type = fk.ThunderDamage
    elseif string.find(effect.card.name, "fire__slash") then damage_type = fk.FireDamage
    elseif string.find(effect.card.name, "ice__slash") then damage_type = fk.IceDamage
    elseif string.find(effect.card.name, "bright__slash") then damage_type = fk.BrightDamage end 
    room:damage({
      from = effect.from,
      to = effect.to,
      card = effect.card,
      damage = 1,
      skillName = skill.name,
      damageType = damage_type,
    })
    if effect.to:isAlive() then
      if ls.getTrueStrategy(effect.to) ~= "none" then
        ls.loseStrategy(effect.to, "choice")
      end
    end
  end,
})


return skill
